﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace webnew.UserControls
{
    public partial class UcCompType : System.Web.UI.UserControl
    {

        protected void Page_Load(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// 如果为TRUE，添加空选项并设置当前公司类型为空选项
        /// </summary>
        /// <param name="isShowAll"></param>
        public void show(bool isShowAll)
        {
            if (isShowAll)
            {
                ddlCompType.Items.Add(new ListItem("", ""));
                SelectedValue = "";
            }
            
        }
        ///// <summary>
        ///// 获取选中的公司类型
        ///// </summary>
        ///// <returns>返回公司类型值</returns>
        //public string GetSelectedValue()
        //{
        //    return ddlCompType.SelectedValue;
            
        //}

        ///// <summary>
        ///// 设置公司类型的选中值
        ///// </summary>
        ///// <param name="compType"></param>
        //public void SetSelectedValue(string compType)
        //{
        //    ddlCompType.SelectedValue = compType;
        //}
       public string SelectedValue
        {
            get{return ddlCompType.SelectedValue;}
            set{ ddlCompType.SelectedValue = value;}
        }
        /// <summary>
        /// 公司类型是否可选
        /// </summary>
        /// <param name="isEnable"></param>
        public void Enable(bool isEnable)
        {
            ddlCompType.Enabled = isEnable;
        }
    }
}